import matplotlib.pyplot as plt
from numpy import array

import kNN


def chape2_2_2():
    fig = plt.figure()
    ax = fig.add_subplot(111)
    datingDataMat, datingLabels = kNN.file2matrix()
    datingDataMat, ranges, minVals = kNN.autoNorm(datingDataMat)
    ax.scatter(datingDataMat[:, 0], datingDataMat[:, 1], 15.0 * array(datingLabels), 15.0 * array(datingLabels))
    plt.show()


chape2_2_2()
